import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';

export default function useAuth() {
  const navigate = useNavigate();
  const back = () => {
    navigate(-1);
  };
  // useEffect(() => {
  //   if (!localStorage.getItem('token')) {
  //     navigate('/login');
  //   }
  // }, []);
  return {
    back,
  };
}
